package ru.jetsoft.reg112.desktop.control;

import extfx.scene.control.NumberSpinner;
import ru.jetsoft.reg112.desktop.data.Param;

public class NumberControl extends InputParamControl {

    private final NumberSpinner numberSpinner;

    public NumberControl(Param param) {
        super(param);
        numberSpinner = new NumberSpinner();
        numberSpinner.setPromptText(param.getTooltip());
        getHBox().getChildren().add(numberSpinner);
    }

    @Override
    public String getValue() {
        return numberSpinner.getText();
    }
}
